/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uk.ac.bath.scheme.sanex;

import uk.ac.bath.base.BuilderIF;
import uk.ac.bath.Logger;
import uk.ac.bath.base.Evaluator;
import java.util.TreeSet;
import java.util.Vector;
import uk.ac.bath.base.BasicEnvironment;
//import uk.ac.bath.base.Cell;
import uk.ac.bath.base.Fitness;
import uk.ac.bath.gui.View;

/**
 *
 * @author pjl
 */
public class SaneEnvironmentX extends BasicEnvironment {

    TreeSet<Net> nets = new TreeSet<Net>();
    float best;
    int generation;
    boolean done = false;

    private BuilderIF builder;
 
    int nPop;
    private int trialsPerGeneration;

    public SaneEnvironmentX(int nPop, int nBreed,
            int trailsPerGeneration,
            Evaluator eval,
            BuilderIF builder) {
        super(eval);
//        numBreed = nBreed;
        this.trialsPerGeneration = trailsPerGeneration;
        this.builder = builder;
        this.evaluator = eval;
        this.nPop = nPop;
        // genes = new Gene[nPop];
        tweaks.addAll(eval.getTweaks());
        init();


    }

    public Evaluator getEvaluator() {
        return evaluator;
    }

    protected void init() {


        done = false;
        generation = 0;
        best = 0.0f;
        this.best = 0.0f;
    }

    public View createSimulationView() {
        return evaluator.createView();
    }


    @Override
    public void nextEvaluation(Fitness fitness) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void zap() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void setLogger(Logger log) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}


